﻿using UnityEngine;
using UnityEditor;
using System.Collections;
using System.Collections.Generic;
using TTGameEngine;

/*
 * TestPuppetActionEditor
 *
 *
 *
 * 依赖：
 *
 * ！不写重复代码！
 * @author TTun
 * @date 8/10/2017 3:05:43 PM
 */
[CustomEditor(typeof(TestPuppetAction))]
public class TestPuppetActionEditor : Editor {
    private SerializedObject scriptObj;
    private TestPuppetAction obj;

    void OnEnable() {
        scriptObj = new SerializedObject(target);
        obj = target as TestPuppetAction;


    }

    public override void OnInspectorGUI() {

        scriptObj.Update();

        base.OnInspectorGUI();
        scriptObj.ApplyModifiedProperties();

        if(GUILayout.Button("Hurt")) {
            obj.Hurt();
        }
        if(GUILayout.Button("Reload")) {
            obj.Reload();
        }
        if(GUILayout.Button("Stand")) {
            obj.Stand();
        }
        if(GUILayout.Button("Dead")) {
            obj.Dead();
        }
        if(GUILayout.Button("CastSkill")) {
            obj.CastSkill();
        }
        if(GUILayout.Button("StopSkill")) {
            obj.StopSkill();
        }
        if(GUILayout.Button("BreakLoopSkill")) {
            obj.BreakLoopSkill();
        }

    }
}